package com.uinnova.springboot.demo.model;

import com.uinnova.springboot.demo.mybatis.SexEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;
import org.springframework.core.annotation.AliasFor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author 张攀钦
 * @date 2018-12-30-16:56
 */
@Table(name = "sys_user")
@Data
@ApiModel(value = "系统用户")
@Alias(value = "SysUser")
public class SysUser implements Serializable {
    private static final long serialVersionUID = -548314878770093135L;

    @ApiModelProperty(value = "唯一标识")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "sys_id")
    private Integer sysId;

    @ApiModelProperty(value = "系统用户名")
    @Column(name = "sys_name")
    private String sysName;

    @ApiModelProperty(value = "系统用户的年龄")
    @Column(name = "sys_age")
    private String sysAge;

    private SexEnum sexEnum;

//    public void setSexEnum(String sexEnum) {
//        this.sexEnum = SexEnum.getSexEnum(sexEnum);
//    }
//
//    public String getSexEnum(){
//        return sexEnum.getSex();
//    }
}
